Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 3 - Geometric Styles / Geometric Styles Reference
Constants and Data Types


Dash Attributes

Each dash structure contains a set of flags that modify the way a shape is dashed. These constants are defined in the gxDashAttributes enumeration:

enum gxDashAttributes {
   gxBendDash        = 0x0001;    
   gxBreakDash       = 0x0002; 
   gxClipDash        = 0x0004;   
   gxLevelDash       = 0x0008;   
   gxAutoAdvanceDash = 0x0010;    
};
typedef long gxDashAttribute;
Constant descriptions

gxBendDash
Distorts the dash shape to match the contour being dashed. A dash may have the gxBendDash attribute only when the dashed shape's pen width is zero, indicating hairline contours. (Any other pen width results in an error condition.) When the gxBendDash attribute is set, QuickDraw GX maps the dash shape onto the x-axis (so that it becomes one-dimensional) and bends this flattened dash shape along the contours of the shape being dashed.
gxBreakDash
Indicates that QuickDraw GX should rotate and place each contour of the dash shape separately. When this attribute is set, QuickDraw GX calculates the center point of each contour of the dash shape and rotates and centers it appropriately along the contour of the shape being dashed. See Figure 3-25 on page 3-30 for an example.
gxClipDash
Indicates that QuickDraw GX should clip the dashes to the pen width of the dashed shape. See Figure 3-24 on page 3-29 for an example. This attribute causes dashes to have some complicated interactions with caps and joins. See the section "Interactions Between Caps, Joins, Dashes, and Patterns" on page 3-33 and "Combining Caps, Joins, Dashes, and Patterns" beginning on page 3-91 for more information.
gxLevelDash
Suppresses rotation of the dash shape. When this attribute is set, QuickDraw GX does not rotate the dash shape to match the slope of the dashed shape's contours. Instead, QuickDraw GX places the dash shape onto the contours of the dashed shape with the exact orientation specified by the geometry of the dash shape.
gxAutoAdvanceDash
Adjusts the dash advance so that a whole multiple of dash shapes fit each contour.
These sections include examples of using dash attributes:


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996